<?php

use think\migration\Seeder;
use think\facade\Db;

class InsertSystemNav extends Seeder
{
    /**
     * Run Method.
     *
     * Write your database seeder using this method.
     *
     * More information on writing seeders is available here:
     * http://docs.phinx.org/en/latest/seeding.html
     */
    public function run()
    {
        DB::name('system_nav')->insertAll([
            [
                'nav_id'=>1,
                'func_code'=>'102973',
                'nav_name'=>'主页',
                'nav_url' => 'modules/index/index',
                'nav_status' => '0',
                'nav_pid' => '0',
                'sort' => '001',
                'icon'=>'&amp;#xe64a;'
            ],
            [
                'nav_id'=>2,
                'func_code'=>'10001',
                'nav_name'=>'系统管理',
                'nav_url' => '',
                'nav_status' => 0,
                'nav_pid' => 0,
                'sort' => '002',
                'icon'=>'&amp;#xe656;'
            ],
            [
                'nav_id'=>3,
                'func_code'=>'10002',
                'nav_name'=>'参数设置',
                'nav_url' => 'system/setParam/index',
                'nav_status' =>0,
                'nav_pid' => 2,
                'sort' => '003',
                'icon'=>'&amp;#xe655;'
            ],
            [
                'nav_id'=>4,
                'func_code'=>'10003',
                'nav_name'=>'系统配置',
                'nav_url' => 'system/baseMng/index',
                'nav_status' =>0,
                'nav_pid' => 2,
                'sort' => '004',
                'icon'=>'&amp;#xe6ba;'
            ],
            [
                'nav_id'=>5,
                'func_code'=>'10004',
                'nav_name'=>'系统菜单',
                'nav_url' => 'system/navMng/index',
                'nav_status' =>0,
                'nav_pid' => 2,
                'sort' => '005',
                'icon'=>'&amp;#xe656;'
            ],
            [
                'nav_id'=>6,
                'func_code'=>'10005',
                'nav_name'=>'角色管理',
                'nav_url' => 'system/rolesMng/index',
                'nav_status' =>0,
                'nav_pid' => 2,
                'sort' => '006',
                'icon'=>'&amp;#xe64e;'
            ],
            [
                'nav_id'=>7,
                'func_code'=>'10006',
                'nav_name'=>'系统管理员',
                'nav_url' => 'system/userMng/index',
                'nav_status' =>0,
                'nav_pid' => 2,
                'sort' => '007',
                'icon'=>'&amp;#xe656;'
            ],
            [
                'nav_id'=>8,
                'func_code'=>'10007',
                'nav_name'=>'素材管理',
                'nav_url' => 'system/upload/galleryIndex',
                'nav_status' =>0,
                'nav_pid' => 2,
                'sort' => '008',
                'icon'=>'&amp;#xe65f;'
            ]
        ]);
    }
}